import pandas as pd

data = {
    "name": ["lili","Mark","Jack","Tom"],
    "age": [18,19,20,21],
}
df = pd.DataFrame(data)

# 数据转列表
name_list = df['name'].tolist()
print(name_list)
'''['lili', 'Mark', 'Jack', 'Tom']'''

age_list = df['age'].tolist()
print(age_list)
'''[18, 19, 20, 21]'''
